# coding: utf8

if auth.user:
    response.menu_default_setup = [
        (T('Setup'), False, URL('default','setup'), [])
]

response.menu_default_upload = [
    (T('Upload'), False, URL('default','upload'), [])
]

response.menu_default_uploaders = [
    (T('Uploaders'), False, URL('default','uploaders'), [])
]

response.menu_default_downloaders = [
    (T('Downloaders'), False, URL('default','downloaders'), [])
]

response.menu_default_files = [
    (T('Files'), False, URL('default','files'), [])
]

if auth.user:
    response.menu += response.menu_default_setup

if auth.has_membership(auth.id_group('admin')):
    response.menu += response.menu_default_uploaders

# if auth.has_membership(auth.id_group('uploader')):
#    response.menu += response.menu_default_upload

if auth.has_membership(auth.id_group('uploader')):
    response.menu += response.menu_default_files
    
# response.menu += response.menu_default_downloader
